package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Classname CategoryMapper
 * @Description TODO
 * @Date 2023/3/2 14:35
 * @Created by 11404
 */


@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    //查询菜品分类表
    List<Category> CategoryAll();

    //新增菜品分类
    void insertCategory(Category category);

    //修改菜品分类
    void upCategory(Category category);


    //删除菜品分类
    // 根据分类查菜品数量
    Integer countDishByCategoryId(Long id);

    // 根据分类查套餐数量
    Integer countSetmealByCategoryId(Long id);

    // 根据分类id删除
    void deleteById(Long id);

   
}
